<template>
	<view class="notice">
		<view class="notice_title">{{ noticeInfo.title }}</view>
		<view class="notice_time">创建时间：{{ noticeInfo.create_time_m }}</view>
		<view class="notice_detail"><view class="" v-html="noticeInfo.content"></view></view>
		<!-- loading 遮罩层 -->
		<loading v-if="loadflag"></loading>
		<navigation></navigation>
	</view>
</template>

<script>
import loading from '@/components/loading/loading.vue';
import navigation from '@/components/navigation/navigation.vue';
export default {
	components: { loading, navigation },
	data() {
		return {
			loadflag: true,
			noticeid: '',
			noticeInfo: {}
		};
	},
	mounted() {
		this.getnoticeInfo();
	},
	onLoad(options) {
		this.noticeid = options.id;
	},
	methods: {
		getnoticeInfo() {
			this.ajax('club/clubNoticeInfo', {
				data: { id: this.noticeid },
				success: res => {
					 // console.log (res);
					res.msg.create_time_m = res.msg.create_time.split(' ')[0];
					res.msg.content = res.msg.content.replace('<img','<img style="max-width:100%;"')
					this.noticeInfo = res.msg;
					this.loadflag = false;
				}
			});
		}
	}
};
</script>

<style>
page {
	background-color: #ffffff;
}
</style>
<style lang="less" scoped>
.notice {
	background-color: #ffffff;
	padding: 0 30upx;
	box-sizing: border-box;
	overflow: hidden;
	.notice_title {
		margin-top: 20upx;
		font-size: 36upx;
		font-weight: bold;
		color: #333333;
		line-height: 60upx;
	}
	.notice_time {
		font-size: 28upx;
		color: #999999;
		line-height: 70upx;
		border-bottom: 2upx solid #e1e1e1;
		padding-bottom: 10upx;
		box-sizing: border-box;
	}
	.notice_detail {
		margin-top: 20upx;
		font-size: 28upx;
		color: #666666;
		line-height: 46upx;
	}
}
</style>
